package com.zb.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zb.Service.RecordService;
import com.zb.util.PageUtil10;

@Scope("prototype")
@Component
@RequestMapping("/record")
public class RecordController {
	@Autowired
	private RecordService rs;
	@ResponseBody
	@RequestMapping(params = "op=showinfo")
	public Map<String, Object> getRecordInfo(Integer page, Integer rows,String realname,String starttime,String endtime){
		PageUtil10 pu = new PageUtil10();
		pu.setIndex(page);
		pu.setSize(rows);
		Map<String, Object> map = new HashMap<String, Object>();
		rs.getRlist(starttime, endtime, realname, pu);
		map.put("total", pu.getCount());
		map.put("rows", pu.getData());
		return map;
	}
}
